<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../header.jsp"%>
<!-- start content-outer ........................................................................................................................START -->
<div id="content-outer">
    <!-- start content -->
    <div id="content">

        <!--  start page-heading -->
        <div id="page-heading">
            <h1>Detail Informasi Beasiswa</h1>
        </div>
        <!-- end page-heading -->

        <!-- start search -->
        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
            <tr>
                <th rowspan="3" class="sized"><img src="../images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
                <th class="topleft"></th>
                <td id="tbl-border-top">&nbsp;</td>
                <th class="topright"></th>
                <th rowspan="3" class="sized"><img src="../images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
            </tr>
            <tr>
                <td id="tbl-border-left"></td>
                <td>
                    <!--  start content-table-inner ...................................................................... START -->
                    <div id="content-table-inner">

                        <!--  start table-content  -->

                        <!-- start pencarian -->
                        <div id="table-content">
                            <table border="0" width="100%" cellpadding="0" cellspacing="0" id="id-form">
                                <tr>
                                    <th width="38" align="left" valign="middle">Nama Beasiswa</th>
                                    <td width="34" align="center" valign="middle">:</td>
                                    <td width="940">${beasiswa.namaBeasiswa}</td>
                                <tr>
                                <tr>
                                    <th align="left" valign="middle">Kuota Beasiswa</th>
                                    <td align="center" valign="middle">:</td>
                                    <td>${beasiswa.kuotaBeasiswa}</td>
                                </tr>
                                <tr>
                                    <th valign="top">Due Date Beasiswa</th>
                                    <td align="center" valign="middle">:</td>
                                    <td>${beasiswa.deadline}</td>
                                </tr>
                                <tr>
                                    <th valign="top">Deskripsi Beasiswa</th>
                                    <td align="center" valign="middle">:</td>
                                    <td>${beasiswa.deskripsiBeasiswa}</td>
                                </tr>   
                                <tr>
                                    <th valign="top">&nbsp;</th>
                                    <td align="center" valign="middle">&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                                </table>
                                <table border="0" width="100%" cellpadding="0" cellspacing="0" id="id-form">
                                <tr>
                                    <td>Daftar Penerima Beasiswa:</td>
                                </tr>
                                <c:if test="${empty penerimaBea}" >
                                    <tr>
                                        <td ><Strong>Penerima beasiswa belum ada</strong></td>
                                    </tr>
                                </c:if>
                                <% int i = 1;%> 
                                <c:forEach items="${penerimaBea}" var="penerimaBea">
                                    <tr>
                                        <td><% out.print(i); i++;%> ${penerimaBea.user.namaUser} (${penerimaBea.user.idUser})</td>
                                    </tr>
                                </c:forEach>
                                <tr>
                                    <th valign="top">&nbsp;</th>
                                </tr>
                                <tr>
                                    <td><%
                                        ArrayList listRole2 = new ArrayList();
                                        listRole2 = (ArrayList) session.getAttribute("role");
                                        int count2;
                                        String role2;
                                        for (count2 = 0; count2 < listRole2.size(); count2++) {
                                            role2 = (String) listRole2.get(count2);
                                            if (role2.equals("mahasiswa")) {
                                        %>
                                <p>

                                    <a href="tambahPengajuanBeasiswa?idBeasiswa=${beasiswa.idBeasiswa}">Daftar</a>

                                </p>
                                <%                                }
                                    }
                                %></td>
                                </tr>
                                <tr>
                                    <th valign="top"><a href="javascript: window.history.go(-1)">Kembali</a></th>
                                    <td align="center" valign="middle">&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                            </table>
                        </div>
                        <!-- end pencarian -->

                        <!--  end content-table  -->

                        <!--  start actions-box ............................................... --><!-- end actions-box........... -->

                        <!--  start paging..................................................... -->

                        <!--  end paging................ -->

                        <div>


                        </div>

                    </div>
                    <!--  end content-table-inner ............................................END  -->
                </td>
                <td id="tbl-border-right"></td>
            </tr>
            <tr>
                <th class="sized bottomleft"></th>
                <td id="tbl-border-bottom">&nbsp;</td>
                <th class="sized bottomright"></th>
            </tr>
        </table>
        <div class="clear">&nbsp;</div>

    </div>
    <!--  end content -->
    <div class="clear">&nbsp;</div>
</div>
<!--  end content-outer........................................................END -->
<!--  end content-outer........................................................END -->
<%@include file="../footer.jsp"%>